Skip to content

Conversation

@pjfanning
Copy link
Member

@pjfanning pjfanning commented Oct 17, 2025

Idea is to leave pekko-http-jackson as supporting Jackson v2.x and to add a pekko-http-jackson3.

Jackson 3 is a significant rewrite and has lots of config changes compared to Jackson 2.

Aim is to backport this to 1.3.x branch to include in the 1.3.0 release.

@pjfanning pjfanning added this to the 2.0.0 milestone Oct 17, 2025
@pjfanning pjfanning changed the title [WIP] support Jackson v3 support Jackson v3 Oct 20, 2025
docs

javafmt

jackson2 in docs

Update build.sbt

fix tests by using jackson 2 style config

Update json-support.md

Update json-support.md

test fix

Update json-support.md

Update Jackson.java

Update json-support.md

revert format change
}

private static ObjectMapper createMapper() {
return createMapper(ConfigFactory.load().getConfig("pekko.http.marshallers.jackson3"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to make it overrideable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API methods allow you to provide your own ObjectMapper so this code is just for the case where we need to create an ObjectMapper instance because the user hasn't provided one.
If we were to open this up, I would prefer if users were requesting it. This is a copy of the code from pekko-http-jackson and noone was requesting any changes to this for that module.

+ maxTokenCount
+ "\n"
+ "read.max-nesting-depth="
+ maxNestingDepth;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use """ in java 17?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The aim is to backport this PR to v1.3.0 so I need code that compiles with Java 8.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the Java 17 version for this PR and then modify the cherry pick for 1.3.0 with git rebase, but it might be simpler to just stick with Java 8 syntax

Copy link
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@pjfanning pjfanning marked this pull request as draft October 21, 2025 08:18
@pjfanning pjfanning marked this pull request as ready for review October 21, 2025 08:27
@pjfanning pjfanning merged commit 8c958d8 into apache:main Oct 21, 2025
5 checks passed
@pjfanning pjfanning deleted the jackson3 branch October 21, 2025 09:34
pjfanning added a commit to pjfanning/incubator-pekko-http that referenced this pull request Oct 21, 2025
docs

javafmt

jackson2 in docs

Update build.sbt

fix tests by using jackson 2 style config

Update json-support.md

Update json-support.md

test fix

Update json-support.md

Update Jackson.java

Update json-support.md

revert format change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants